﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using University.Workshop.DataAccess;

namespace University.Workshop.WinApp
{
    public partial class listForInvoice :TemplateForm
    {
        private InvoiceData invoice = new InvoiceData();
        public string FullName { get; set; }
        public string NIT { get; set; }
        public string Pago { get; set; }
        public string user { get; set; }
        public listForInvoice()
        {
            InitializeComponent();
           
            this.dataGridEmploye.Rows.Clear();
           
            invoice.GetEmployeeInvoice(this.dataGridEmploye);

        }
        private void dataGridEmploye_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewCell selectCI = dataGridEmploye.CurrentRow.Cells[0];
            DataGridViewCell selectName = dataGridEmploye.CurrentRow.Cells[1];
            this.NIT = selectCI.Value.ToString();
            this.FullName = selectName.Value.ToString();
            this.Pago = dataGridEmploye.CurrentRow.Cells[2].Value.ToString();
            this.user = "employe";
            this.Close();
            
        }
    }
}
